<!--
 * @Author: your name
 * @Date: 2022-04-16 09:38:16
 * @LastEditTime: 2022-04-16 10:29:37
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \算法测试\day0906\4.16.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // let a = {age:18};
        // function fn(obj) {
        //     obj = {age:13}
        // }
        // fn(a);
        // console.log(a);

        function Person(a) {
            this.a = a;
        }
        let a1 = new Person(1);
        let b1 = new Person(2);
        console.log(Object.prototype.toString.call(a1)) //object

        let obj = {}
        function test() {
            this.a = 2
            console.log(12312);
        }
        test.call(obj);
        console.log(obj.a);
        console.log(obj);

        let c = new test();
        console.log(c.a);
        obj.a = 3
        console.log(obj);
        test()
        console.log(obj);console.log(a);
    </script>
</body>
</html>